<include file="Public/header" />
<style>
.tags_add{padding:4px 10px;line-height:33px;margin-left:10px;}
.tags_container{width:1000px;min-height:80px;border:1px solid #ccc;border-radius:3px;overflow:auto;}
.tags_container div{float:left;min-width:100px;border:1px solid #ccc;height:30px;margin:5px 10px;border-radius:3px;cursor:pointer;}
.tags_container div span{float:left;margin:0 8px;line-height:30px}
.tags_container div img{float:right;margin:7px 3px auto auto;width:16px;line-height:30px}
</style>
    <div class="comm-top">
        <h4 style="margin-bottom:0">添加方案</h4>
        <div class="add_page_top"></div>
    </div>
    <form id="dataForm" onsubmit="return false;">
        <input type="hidden" name="info[id]" value="{$item.id}"/>
         <input type="hidden" name="info[customer_id]" value="{$suser.id}">
        <input type="hidden" name="info[customer_name]" value="{$suser.name}">
        <div class="shop_sort_box">
            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>方案名称：</h4></div>
                <div class="shop_sort_set">
                    <input class="shop_sort_text" name="info[name]" value="{$item.name}" type="text" placeholder="请输入方案名称" />
                </div>
            </div>

            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>售价：</h4></div>
                <div class="shop_sort_set">
                    <input class="shop_sort_text" name="info[price]" value="{$item.price}" type="text" placeholder="免费可不输入价格" />
                </div>
            </div>

            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>创意人：</h4></div>
                <div class="shop_sort_set">
                    <input class="shop_sort_text" name="info[idea_people]" value="{$item.idea_people}" type="text" placeholder="请输入创意人名称" />
                </div>
            </div>

            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>标签：</h4></div>
                <div style="float:left;">
	                <div class="shop_sort_set">
	                    <input class="shop_sort_text" name="info[label]" value="{$item.label}" type="text" placeholder="请添加标签" />
	                    <span onclick="save(this);return false" class="btngreen30 tags_add">添加标签</span>
	                </div>
	                <div class="shop_sort_set">
	                    <div class="tags_container">
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    	<div><span>非常漂亮的fsfsf</span><img src="__PUBLIC__/admin/images/close1.png"/></div>
	                    </div>
	                </div>
                </div>
            </div>
            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>附件：</h4></div>
                <div class="shop_sort_set">
                    <input class="shop_sort_text" name="info[file]" value="{$item.file}" type="file"  />
                </div>
            </div>
              <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>SEO关键字：</h4></div>
                <div class="shop_sort_set">
                    <input class="shop_sort_text" name="info[seo_keyword]" value="{$item.seo_keyword}" type="text" placeholder="多关键字可用逗号分割" />
                </div>
            </div>
       
            <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>SEO描述：</h4></div>
                <div class="shop_sort_set">
                    <textarea name="info[seo_desc]" value="{$item.seo_desc}" style="width:1000px; height:100px;">{$item.seo_desc}</textarea>
                </div>
            </div>

             <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>方案摘要：</h4></div>
                <div class="shop_sort_set">
                    <textarea name="info[abstract]" value="{$item.abstract}" style="width:1000px; height:140px;">{$item.abstract}</textarea>
                </div>
            </div>

             <div class="shop_sort">
                <div class="shop_sort_title"><h4><must>*</must>方案介绍：</h4></div>
                <div class="shop_sort_set">
                    <textarea name="info[descs]" value="{$item.descs}" style="width:1000px; height:140px;">{$item.descs}</textarea>
                </div>
            </div>

            <div class="shop_sort">
            <div class="shop_sort_title"><h4>详情：</h4></div>
            <div class="shop_sort_set">
                <textarea id="content" name="info[details]" style="width:1000px;height:150px;">{:htmlentities(html_entity_decode($item['details']))}</textarea>
            </div>
        </div>

            <div class="shop_sort">
                <div class="shop_sort_title"><h4>状态：</h4></div>
                <div class="shop_sort_set rdo">
                    <label class="lbl"><span><input type="radio" name="info[status]" {:$item['status']!='0'?'checked':''} value='1'></span><span>开启</span></label>
                    <label class="lbl"><span><input type="radio" name="info[status]" {:$item['status']=='0'?'checked':''} value='0'></span><span>关闭</span></label>
                </div>
            </div>
            <div class="shop_sort">
                <div class="shop_sort_title">
                    <h4>&nbsp;</h4>
                </div>
                <div class="shop_sort_set">
                    <span onclick="save(this);return false" id="saveBtn" class="btngreen30">完成</span>
                    &nbsp;&nbsp;&nbsp;
                    <span onclick="history.go(-1);" class="btngray30">返回</span>
                </div>
            </div>
        </div>
    </form>
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__PUBLIC__/ueditor/ueditor.all.js"></script>
<script type="text/javascript">

$(function(){
    //初始化编辑器
    UE.getEditor('content', {
        toolbars: [['source','bold','italic','underline','fontsize','forecolor','backcolor','pasteplain','insertorderedlist','cleardoc','link','simpleupload','emotion','map','inserttable','insertvideo','date','fontfamily','justifyleft','justifyright','justifycenter','justifyjustify','forecolor','attachment'
        //'insertimage',//多图上传
        ]]
    });
});

function save(obj){
    $.post('{:U("Programme/save")}',$('#dataForm').serialize(),function(res){
        if(res.status == 1){
            note_info(res.info,obj);
            setTimeout('window.location.href="'+document.referrer+'"',1200);
        }else{
            note_info(res.info,obj,'warn');
        }
    },'json')
}
</script>
<include file="Public/footer" />